package edu.uob;

import java.util.List;

public class CmdType {
    private final CmdTypeEnum type;
    private static String dbName;
    private static String tblName;
    private static String query;
    private List<String> WildAttribList;
    private List<String> attrList;
    private String attributeName;
    private static String Condition;

    public CmdType(CmdTypeEnum type, String dbName) {
        this.type = type;
        CmdType.dbName = dbName;
    }

//    public void setValueList( CmdTypeEnum type2, String dbNam2,List<String> ValueList2){
//        this.type = type2;
//        this.dbName = dbNam2;
//        this.ValueList = ValueList2;
//    }

    public CmdType(CmdTypeEnum type, String dbName, String tblName) {
        this.type = type;
        CmdType.dbName = dbName;
        CmdType.tblName = tblName;
    }

    public CmdType(CmdTypeEnum type, String dbName, String tblName, List<String> attrList) {
        this.type = type;
        CmdType.tblName = tblName;
        CmdType.dbName = dbName;
        this.attrList = attrList;
    }

    public CmdType(CmdTypeEnum type, String dbname, String tblName, String condition, String query) {
        this.type = type;
        CmdType.tblName = tblName;
        CmdType.dbName = dbName;
        Condition = condition;
        CmdType.query = query;
    }

    public CmdType(CmdTypeEnum type, String dbName, String tblName, String attributeName) {
        this.type = type;
        CmdType.tblName = tblName;
        CmdType.dbName = dbName;
        this.attributeName = attributeName;
    }

    public CmdType(CmdTypeEnum type, String dbname, String tblName, List<String> WildAttribList, String query) {
        this.type = type;
        CmdType.tblName = tblName;
        CmdType.dbName = dbName;
        this.WildAttribList = WildAttribList;
        CmdType.query = query;
    }

    public CmdType(CmdTypeEnum type, String dbname, String tblName, List<String> WildAttribList, String Condition, String query) {
        this.type = type;
        CmdType.tblName = tblName;
        CmdType.dbName = dbName;
        this.WildAttribList = WildAttribList;
        CmdType.Condition = Condition;
        CmdType.query = query;
    }

    public static String getCondition() {return Condition;}

    public static String getQuery() {return query;}

    public CmdTypeEnum getType() {
        return type;
    }

    public static String getDbName() {
        return dbName;
    }

    public static String getTblName() {
        return tblName;
    }

    public List<String> getAttrList() {
        return attrList;
    }

    public String getAttributeName() {
        return attributeName;
    }

    public List<String> getWildAttribList() {
        return WildAttribList;
    }



//    @Override
//    public String toString() {
//        return "CmdType{" +
//                "type=" + type +
//                ", dbName='" + dbName + '\'' +
//                ", tblName='" + tblName + '\'' +
//                ", attrList=" + attrList +
//                '}';
//    }
}